/**
 * Created by JetBrains WebStorm.
 * User: nhuang
 * Date: 12-3-30
 * Time: 上午11:57
 * To change this template use File | Settings | File Templates.
 */
(function($){
    $.fn.myForm=function(options){
        var defaults={
            titleClass:"",
            evenRowClass:"",
            oddRowClass:"",
            activeRowClass:""
        }
        var options=$.extend(defaults,options);
        this.each(function(){
            var thisTable=$(this);
            thisTable.find("tr").has("th").addClass(options.titleClass);
            thisTable.find("tr:even").addClass(options.evenRowClass);
            thisTable.find("tr:odd").addClass(options.oddRowClass);
            thisTable.find("tr").mouseover(function(){
                $(this).addClass(options.activeRowClass)
            });
            thisTable.find("tr").mouseout(function(){
                $(this).removeClass(options.activeRowClass)
            })
        })
    };
})(jQuery);
